public class ConfigINI
{
    public string path;

    [DllImport("kernel32")]
    private static extern long WritePrivateProfileString(string section, string key,
                string val, string filePath);

    [DllImport("kernel32")]
    private static extern int GetPrivateProfileString(string section, string key, string def,
                StringBuilder retVal, int size, string filePath);

    public ConfigINI(String file_path)
    {
        this.path = file_path;
    }


    public String GetSectionKey(String section, String key)
    {
        StringBuilder temp = new StringBuilder(1024);
        int i = GetPrivateProfileString(section, key, "", temp, 1024, this.path);
        return temp.ToString();
    }
}